const Layout = () => import("@/layout/index.vue")

export default [
  {
    path: "/redirect",
    component: Layout,
    meta: {
      hidden: true
    },
    children: [
      {
        path: "/redirect/:path(.*)",
        component: () => import("@/views/redirect/index.vue")
      }
    ]
  },
  {
    path: "/403",
    component: () => import("@/views/error-page/403.vue"),
    meta: {
      hidden: true
    }
  },
  {
    path: "/404",
    component: () => import("@/views/error-page/404.vue"),
    meta: {
      hidden: true
    },
    alias: "/:pathMatch(.*)*"
  },
  {
    path: "/login",
    component: () => import("@/views/login/index.vue"),
    meta: {
      hidden: true
    }
  },
  {
    path: "/",
    component: Layout,
    redirect: "/dashboard",
    children: [
      {
        path: "dashboard",
        component: () => import("@/views/dashboard/index.vue"),
        name: "Dashboard",
        meta: {
          title: "首页",
          icon: "dashboard",
          affix: true
        }
      }
    ]
  },
  {
    path: "/userManage",
    component: Layout,
    meta: {
      title: "用户管理",
      keepAlive: true,
      icon: "project"
    },
    children: [
      {
        path: "user",
        component: () => import("@/views/userManage/user/index.vue"),
        name: "User",
        meta: {
          title: "用户管理",
          icon: "user",
          keepAlive: true
        }
      }
    ]
  },
  {
    path: "/articleManage",
    component: Layout,
    meta: {
      title: "文章管理",
      keepAlive: true,
      icon: "project"
    },
    children: [
      {
        path: "article",
        component: () => import("@/views/articleManage/article/index.vue"),
        name: "Article",
        meta: {
          title: "文章",
          icon: "#",
          keepAlive: true
        }
      },
      {
        path: "comment",
        component: () => import("@/views/articleManage/comment/index.vue"),
        name: "ArticleComment",
        meta: {
          title: "评论",
          icon: "#",
          keepAlive: true
        }
      }
    ]
  },
  {
    path: "/photoManage",
    component: Layout,
    meta: {
      title: "展影管理",
      keepAlive: true,
      icon: "xiangji"
    },
    children: [
      {
        path: "photo",
        component: () => import("@/views/photoManage/photo/index.vue"),
        name: "Photo",
        meta: {
          title: "展影",
          icon: "#",
          keepAlive: true
        }
      },
      {
        path: "comment",
        component: () => import("@/views/photoManage/comment/index.vue"),
        name: "PhotoComment",
        meta: {
          title: "评论",
          icon: "#",
          keepAlive: true
        }
      }
    ]
  },
  {
    path: "/contactManage",
    component: Layout,
    meta: {
      title: "留言管理",
      keepAlive: true,
      icon: "liuyan"
    },
    children: [
      {
        path: "contact",
        component: () => import("@/views/contactManage/contact/index.vue"),
        name: "Contact",
        meta: {
          title: "留言管理",
          icon: "liuyan",
          keepAlive: true
        }
      }
    ]
  }
]
